import java.util.ArrayList;
import java.util.List;

/**
 * @author fxy
 * @date 2022/5/6 17:56
 */
public class ded {
    public static void main(String[] args) {
        List<student> list1=new ArrayList<>();
        student s=new student();
        s.setId("1");
        s.setName("22");
        list1.add(s);

        List<teacher> list2=new ArrayList<>();
        teacher t=new teacher();
        t.setId("2");
        t.setName("333");
        list2.add(t);

        s.setList(list2);
        System.out.println(list1);
    }
}
